class PagedList<T>{
  int? pageIndex;
  int? totalCount;
  int? pageSize;
  int? totalPages;
  List<T>? list;

  PagedList.fromJson(Map<String, dynamic> json, T Function(Map<String, dynamic>) fromJsonT) {
    pageIndex = json['pageIndex'];
    totalCount = json['totalCount'];
    pageSize = json['pageSize'];
    totalPages = json['totalPages'];
    if (json['list'] != null) {
      list = (json['list'] as List).map((i) => fromJsonT(i as Map<String,dynamic>)).toList();
    }
  }

  Map<String, dynamic> toJson(Map<String, dynamic> Function(T) toJsonT) {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['pageIndex'] = this.pageIndex;
    data['totalCount'] = this.totalCount;
    data['pageSize'] = this.pageSize;
    data['totalPages'] = this.totalPages;
    if (this.list != null) {
      data['list'] = list!.map((v) => toJsonT(v)).toList();
    }
    return data;
  }
}